function [B2bot] = B2BOT(NmF2, foF2, M3000)
%
% F2-Layer Bottom Thickness
%
%DESCRIPTION:
%This function computes the F2-Layer Bottom Thickness.
%
%PROTOTYPE:
% [B2bot] = B2BOT(NmF2, foF2, M3000)
%
%--------------------------------------------------------------------------
% INPUTS:
%   NmF2       [1x1]       F2-Layer Max. Density     [1e11 m-3]
%   foF2       [1x1]       F2-Layer Crit. Frequency  [MHz]
%   M3000      [1x1]       M(3000)F2                 [-]  
%--------------------------------------------------------------------------
% OUTPUTS:
%   B2bot      [1x1]       F2-Lay. Bottom Thickness  [km]
%--------------------------------------------------------------------------
%
%NOTES:
% (none)
%
%CALLED FUNCTIONS:
% (none)
%
%UPDATES:
% 09/02/2022 - Corrected constant in eq. following [2]
%
%REFERENCES:
% [1] "Ionospheric Correction Algorithm for Galileo Single-Frequency Users"
%      - European GNSS (Galileo) Open Service
% [2] "Electron Density Models and Data for Transionospheric Radio
%      Propagation" - Report ITU-R P.2297-1 (05/2019)
%
%AUTHOR(s):
%Luigi De Maria, Matteo D'Addazio, 2022
%

%% Main Code

B2bot = (0.385*NmF2) / (0.01*exp(-3.467 + 0.857*log(foF2^2) + 2.02*log(M3000)));
                                         %1.714[2]
end